//
//  DataBase.h
//  rss_reader
//
//  Created by Oleg Soldatoff on 4/13/12.
//  Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <sqlite3.h>
#import "Network.h"
#import "XMLParser.h"
#import "Updater.h"

@interface DataBase : NSObject {


  dispatch_queue_t exampleQueue;
  

}

- (void) addFeeds: (NSMutableArray*) arrWithFeeds forSite: (NSString*) siteName;
- (NSNumber *) siteIDForSite: (NSString*) siteName;
- (NSNumber *) feedIDFromFeedURL: (NSString*) feedURL;
- (void) saveArticles: (NSArray*) articlesArr forFeed: (NSNumber*) feedID;


- (void) articleDidReadWihStatus: (NSString*) articleURL;
- (void) articleDidRead: (NSString*) articleURL;
- (void) articleWillRead: (NSString*) articleURL;
- (NSNumber *) newArticles;
- (NSNumber *) newArticlesForSiteID: (NSNumber *) siteID;
- (NSNumber *) newArticlesForFeedID: (NSNumber *) feedID;


- (NSMutableArray *)baseNews: (NSInteger) view forFeedID: (NSInteger) feedID;
- (NSMutableArray *) baseFeedsForSiteID:(NSInteger) siteID;
- (NSMutableArray *) baseSites;

-(void) updateAllFromInet;


@end
